package com.py.credit.controller;


import com.py.credit.common.logs.ExceptionLogger;
import com.py.credit.common.rest.RestServiceResult;
import com.py.credit.entity.*;
import com.py.credit.service.UploadService;
import com.py.credit.utils.DateUtil;
import com.py.credit.utils.DateUtils;
import com.py.credit.utils.SubmitConvXmlUtils;
import com.py.framework.core.annotation.IgnoreAuthority;

import org.apache.commons.codec.binary.Base64;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.configuration.jsse.TLSClientParameters;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.cxf.transport.http.HTTPConduit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import javax.xml.namespace.QName;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Properties;
import java.util.stream.Collectors;

@RestController
@RequestMapping(value = "/upload")
public class UploadController {
    protected int socketTimeout = 30000;// 请求超时时间
    protected int connectTimeout = 30000;// 传输超时时间
    protected String XKPostUrl = "https://59.227.152.250:8443/creditdatas/ws/xzxkNewService?wsdl";
    protected String sgs_apiKey = "663D9A32DEA4499CB1A7679B703499A4";
    private final Logger log = LoggerFactory.getLogger(UploadController.class);
    protected String namespace = "com.test.webservices";//命名空间
    protected String xzxkMetohName = "importPermissionXml";
    protected String CFPostUrl="https://59.227.152.250:8443/creditdatas/ws/xzcfNewService?wsdl";
    protected String xzcfMetohName = "importPenalyXml";
    protected String cns_apiKey = "5146C8AA8D984DCE81B885329529AC30";
    protected String FRXYCNPostUrl="https://222.143.33.180:8443/creditdatas/ws/cxycnService?wsdl";
    protected String FRXYCNMetohName = "importCxycnXml";
    protected String ZRRXYCNPostUrl="https://222.143.33.180:8443/creditdatas/ws/pxycnService?wsdl";
    protected String ZRRXYCNMetohName = "importPxycnXml";
    protected String LYJNPostUrl="https://222.143.33.180:8443/creditdata/ws/xycnLyjnService?wsdl";
    protected String LYJNMetohName = "importXycnLyjnXml";

    @Autowired
    private UploadService upLoadService;

    /**
     * 上传行政许可
     * 0 法人 1 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadXzxk.json")
    public RestServiceResult<Object>  uploadXzxk(int type) throws UnsupportedEncodingException {
    	RestServiceResult<Object> result = new RestServiceResult<Object>();
    	
        try {
            Object data = execute(type,namespace, XKPostUrl,  xzxkMetohName, 0, null ,sgs_apiKey);
        	result.setData(data);
			return result;
        } catch (UnsupportedEncodingException e) {
        	ExceptionLogger.error("UploadController#uploadXzxk", "数据推送异常！ERROR：" + e.getMessage(), e);
        	result.setCode(RestServiceResult.CODE_UNKNOW);
			result.setMsg("行政许可推送定时任务异常！");
			return result;
        }
        
    }

    /**
     * 上传行政处罚
     * @param type 2 法人 3 自然人
     * @throws UnsupportedEncodingException
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadXzcf.json")
    public  RestServiceResult<Object> uploadXzcf(int type) throws UnsupportedEncodingException {
    	RestServiceResult<Object> result = new RestServiceResult<Object>();
       
       
        try {
        	Object	data = execute(type,namespace, CFPostUrl, xzcfMetohName, 0, null ,sgs_apiKey);
        	result.setData(data);
			return result;
        } catch (UnsupportedEncodingException e) {
        	ExceptionLogger.error("UploadController#uploadXzcf", "数据推送异常！ERROR：" + e.getMessage(), e);
        	result.setCode(RestServiceResult.CODE_UNKNOW);
			result.setMsg("行政处罚推送定时任务异常！");
			return result;
        }
       
    }
    /**
     * 上传承诺书
     * 4 法人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadFrXycn.json")
    public RestServiceResult<Object>  uploadFrXycn() throws UnsupportedEncodingException {
    	RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
        	Object	data = execute(4,namespace, FRXYCNPostUrl,   FRXYCNMetohName, 0, null ,cns_apiKey);
        	result.setData(data);
			return result;
        } catch (UnsupportedEncodingException e) {
        	ExceptionLogger.error("UploadController#uploadFrXycn", "数据推送异常！ERROR：" + e.getMessage(), e);
        	result.setCode(RestServiceResult.CODE_UNKNOW);
			result.setMsg("行政处罚推送定时任务异常！");
			return result;
        }
       
    }

    /**
     * 上传承诺书
     * 5 自然人
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadZrrXycn.json")
    public RestServiceResult<Object>  uploadZrrXycn() throws UnsupportedEncodingException {
    	RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
        	Object	data =  execute(5,namespace, ZRRXYCNPostUrl,   ZRRXYCNMetohName, 0, null,cns_apiKey);
        	result.setData(data);
			return result;
        } catch (UnsupportedEncodingException e) {
        	ExceptionLogger.error("UploadController#uploadZrrXycn", "数据推送异常！ERROR：" + e.getMessage(), e);
        	result.setMsg("行政处罚推送定时任务异常！");
			return result;
        }
       
    }

    /**
     * 上传履约践诺
     * 6 
     */
    @IgnoreAuthority
    @RequestMapping(value = "/uploadLyjn.json")
    public RestServiceResult<Object>  uploadLyjn() throws UnsupportedEncodingException {
    	RestServiceResult<Object> result = new RestServiceResult<Object>();
        try {
        	Object	data =  execute(6,namespace, LYJNPostUrl,   LYJNMetohName, 0, null,cns_apiKey);
        	result.setData(data);
			return result;
        } catch (UnsupportedEncodingException e) {
        	ExceptionLogger.error("UploadController#uploadZrrXycn", "数据推送异常！ERROR：" + e.getMessage(), e);
        	result.setMsg("行政处罚推送定时任务异常！");
			return result;
        }
       
    }
    /**
     *
     * @param type 0 法人许可 1 自然人许可 2 法人处罚 3 自然人处罚  4 法人承诺书 5 自然人承诺书
     * @param namespace
     * @param postUrl
     * @param method
     * @param paramsNum
     * @param params
     * @return
     * @throws UnsupportedEncodingException
     */
  
    public String execute(int type,String namespace, String postUrl, String method, int paramsNum, String[] params, String apiKey) throws UnsupportedEncodingException {
        try {
            String tableName="";
            if(type==0){
                tableName="t_1000000010001_3ioj4gezqu";
                List<SubmitXzxkBean> xzxkList = upLoadService.getXzXkList();
                List<List<SubmitXzxkBean>> parList = ListUtils.partition(xzxkList, 999);

                for (int i = 0; i < parList.size(); i++) {
                    List<SubmitXzxkBean> spXkList = parList.get(i);
                    SubmitReqData req = new SubmitReqData();
                    req.setXzxk(spXkList);
                    // 上报数据转换成xml
                    String xzxkXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("上报数据转换成xml" + xzxkXmlValue);
                    log.debug("行政许可转XML内容：{}", xzxkXmlValue);
                    String respXzxkValue = doPostSoap1_1(postUrl, xzxkXmlValue,apiKey, xzxkMetohName);

                    log.info("返回行政许可上报结果信息：{}", respXzxkValue);
                    System.out.println("返回行政许可上报结果信息：{}" + respXzxkValue);
                    SubmitXzxkRespData xzxkResp = (SubmitXzxkRespData) SubmitConvXmlUtils
                            .convertXml2Object(SubmitXzxkRespData.class, respXzxkValue);
                    //保存返回数据
                    this.saveSubmitLogs(type, xzxkResp.getResp(), spXkList, null,tableName);
                    return respXzxkValue;
                }

            }else if(type==1){
                tableName="t_1000010010003_vVwjDLoDWy";
                List<SubmitXzxkBean> xzxkList = upLoadService.getZrrXzXkList();
                List<List<SubmitXzxkBean>> parList = ListUtils.partition(xzxkList, 999);

                for (int i = 0; i < parList.size(); i++) {
                    List<SubmitXzxkBean> spXkList = parList.get(i);
                    SubmitReqData req = new SubmitReqData();
                    req.setXzxk(spXkList);
                    // 上报数据转换成xml
                    String xzxkXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("上报自然人许可数据转换成xml" + xzxkXmlValue);
                    log.debug("自然人行政许可转XML内容：{}", xzxkXmlValue);
                    String respXzxkValue = doPostSoap1_1(postUrl, xzxkXmlValue,apiKey, xzxkMetohName);

                    log.info("返回自然人行政许可上报结果信息：{}", respXzxkValue);
                    System.out.println("返回自然人行政许可上报结果信息：{}" + respXzxkValue);
                    SubmitXzxkRespData xzxkResp = (SubmitXzxkRespData) SubmitConvXmlUtils
                            .convertXml2Object(SubmitXzxkRespData.class, respXzxkValue);
                    //保存返回数据
                    this.saveSubmitLogs(type, xzxkResp.getResp(), spXkList, null, tableName);
                    return respXzxkValue;
                }

            }else if(type==2){
                tableName="t_1000000010002_xsni4zszp0";
                List<SubmitXzcfBean> xzCfList = upLoadService.getFrXzCfList();
                List<List<SubmitXzcfBean>> parList = ListUtils.partition(xzCfList, 999);

                for (int i = 0; i < parList.size(); i++) {
                    List<SubmitXzcfBean> spCfList = parList.get(i);
                    SubmitReqData req = new SubmitReqData();
                    req.setXzcf(spCfList);
                    // 上报数据转换成xml
                    String xzCfXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("上报行政处罚数据转换成xml" + xzCfXmlValue);
                    log.debug("行政处罚转XML内容：{}", xzCfXmlValue);
                    String respXzxkValue = doPostSoap1_1(postUrl, xzCfXmlValue, apiKey, xzcfMetohName);

                    log.info("返回行政处罚上报结果信息：{}", respXzxkValue);
                    System.out.println("返回行政处罚上报结果信息：{}" + respXzxkValue);
                    SubmitXzxkRespData xzCfResp = (SubmitXzxkRespData) SubmitConvXmlUtils
                            .convertXml2Object(SubmitXzxkRespData.class, respXzxkValue);
                    //保存返回数据
                    this.saveSubmitLogs(type, xzCfResp.getResp(), null, spCfList, tableName);
                }
            }else if(type==3){
                tableName="t_1000010010004_kfpulzpf7d";
                List<SubmitXzcfBean> xzCfList = upLoadService.getZrrXzCfList();
                List<List<SubmitXzcfBean>> parList = ListUtils.partition(xzCfList, 999);

                for (int i = 0; i < parList.size(); i++) {
                    List<SubmitXzcfBean> spCfList = parList.get(i);
                    SubmitReqData req = new SubmitReqData();
                    req.setXzcf(spCfList);
                    // 上报数据转换成xml
                    String xzCfXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("上报行政处罚数据转换成xml" + xzCfXmlValue);
                    log.debug("行政处罚转XML内容：{}", xzCfXmlValue);
                    String respXzxkValue = doPostSoap1_1(postUrl, xzCfXmlValue, apiKey,xzcfMetohName);

                    log.info("返回行政处罚上报结果信息：{}", respXzxkValue);
                    System.out.println("返回行政处罚上报结果信息：{}" + respXzxkValue);
                    SubmitXzxkRespData xzCfResp = (SubmitXzxkRespData) SubmitConvXmlUtils
                            .convertXml2Object(SubmitXzxkRespData.class, respXzxkValue);
                    //保存返回数据
                    this.saveSubmitLogs(type, xzCfResp.getResp(), null, spCfList, tableName);
                }
            }else if(type==4){
                tableName="t_1000000010406_faiwdcxymd";
                List<FrPromiseBookBean> promiseBookList = upLoadService.getFrPromiseBookLlist();
                promiseBookList=convert264(promiseBookList);
                List<List<FrPromiseBookBean>> parList = ListUtils.partition(promiseBookList, 999);

                for (int i = 0; i < parList.size(); i++) {
                    List<FrPromiseBookBean> spList = parList.get(i);
                    SubmitReqData req = new SubmitReqData();
                    req.setFrPromise(spList);
                    // 上报数据转换成xml
                    String frcnsXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("上报法人承诺书转换成xml" + frcnsXmlValue);
                    log.debug("法人承诺书XML内容：{}", frcnsXmlValue);
                    String respXzxkValue = doPostSoap1_1(postUrl, frcnsXmlValue,apiKey, FRXYCNMetohName);

                    log.info("返回法人承诺书上报结果信息：{}", respXzxkValue);
                    System.out.println("返回法人承诺书上报结果信息：{}" + respXzxkValue);
                    SubmitXzxkRespData frResp = (SubmitXzxkRespData) SubmitConvXmlUtils
                            .convertXml2Object(SubmitXzxkRespData.class, respXzxkValue);
//                    保存返回数据
                    this.savePromiseSubmitLogs(type, frResp.getResp(),spList,null,tableName);
                }
            }else if(type==5){
                tableName="t_1000010010408_kOuDACvaiG";
                List<ZrrPromiseBookBean> promiseBookList = upLoadService.getZrrPromiseBookLlist();
                promiseBookList=convertZRR264(promiseBookList);
                List<List<ZrrPromiseBookBean>> parList = ListUtils.partition(promiseBookList, 999);

                for (int i = 0; i < parList.size(); i++) {
                    List<ZrrPromiseBookBean> spList = parList.get(i);
                    SubmitReqData req = new SubmitReqData();
                    req.setZrrPromise(spList);
                    // 上报数据转换成xml
                    String frcnsXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("上报自然人承诺书转换成xml" + frcnsXmlValue);
                    log.debug("自然人承诺书XML内容：{}", frcnsXmlValue);
                    String respXzxkValue = doPostSoap1_1(postUrl, frcnsXmlValue,apiKey, ZRRXYCNMetohName);

                    log.info("返回自然人承诺书上报结果信息：{}", respXzxkValue);
                    System.out.println("返回行自然人承诺书结果信息：{}" + respXzxkValue);
                    SubmitXzxkRespData zrrResp = (SubmitXzxkRespData) SubmitConvXmlUtils
                            .convertXml2Object(SubmitXzxkRespData.class, respXzxkValue);
//                    保存返回数据
                    this.savePromiseSubmitLogs(type, zrrResp.getResp(),  null,spList,tableName);
                }
            }else if(type==6){
                tableName="t_1000000010407_zv9mrqcg5k";
                List<LYJNBean> lyjnList = upLoadService.getLyjnlist();       
                List<List<LYJNBean>> parList = ListUtils.partition(lyjnList, 999);

                for (int i = 0; i < parList.size(); i++) {
                    List<LYJNBean> spList = parList.get(i);
                    SubmitReqData req = new SubmitReqData();
                    req.setLyjn(spList);
                    // 上报数据转换成xml
                    String frcnsXmlValue = SubmitConvXmlUtils.convert2Xml(req);
                    System.out.println("上报履约践诺转换成xml" + frcnsXmlValue);
                    log.debug("履约践诺XML内容：{}", frcnsXmlValue);
                    String respXzxkValue = doPostSoap1_1(postUrl, frcnsXmlValue,apiKey, LYJNMetohName);

                    log.info("返回履约践诺上报结果信息：{}", respXzxkValue);
                    System.out.println("返回行履约践诺结果信息：{}" + respXzxkValue);
                    SubmitXzxkRespData zrrResp = (SubmitXzxkRespData) SubmitConvXmlUtils
                            .convertXml2Object(SubmitXzxkRespData.class, respXzxkValue);
//                    保存返回数据
                    this.saveLyjnSubmitLogs(type, zrrResp.getResp(),spList,tableName);
                }
            }

        } catch (Exception e) {
            e.printStackTrace();
            log.info("上传数据失败:", e.getMessage());
        }
        return null;
    }

    /**
     * 使用SOAP1.1发送消息
     *
     * @param postUrl
     * @param soapXml
     * @param soapAction
     * @return
     */
    public String doPostSoap1_1(String postUrl, String soapXml, String apiKey,
                                String soapAction) throws UnsupportedEncodingException {
    	javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(

    			new javax.net.ssl.HostnameVerifier(){

    			public boolean verify(String hostname,

    			javax.net.ssl.SSLSession sslSession) {
    			return true;


    			}
    			});

    			System.clearProperty("javax.net.ssl.trustStore");

    			System.clearProperty("javax.net.ssl.trustStorePassword");

    			try {

    			//这里需要注意的是证书路径如果有空格，上面getPath()会把空格转码为%20F，需要转一次码，其他特殊字符也需注意
    		    	  System.setProperty("javax.net.ssl.trustStore", "C:\\cacerts");
    		    	  System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
    		    	  System.setProperty("org.jboss.security.ignoreHttpsHost", "true");
    			} catch (Exception e) {

    			e.printStackTrace();

    			}
    	try {
			trustAllHttpsCertificates();
		} catch (Exception e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
    	HttpsURLConnection.setDefaultHostnameVerifier(hv);
    	
        try {
            Properties props = System.getProperties();
            props.setProperty("org.apache.cxf.stax.allowInsecureParser", "1");
            props.setProperty("UseSunHttpHandler", "true");
            props.setProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");;
            String nameSpace = "http://dal.rjcloud.dal";
            TLSClientParameters tlsParams = new TLSClientParameters();
			tlsParams.setDisableCNCheck(true);
			
            JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
            Client client = clientFactory.createClient(postUrl);
            HTTPConduit httpConduit = (HTTPConduit) client.getConduit();
			httpConduit.setTlsClientParameters(tlsParams);
            System.out.println("请求地址:"+postUrl);
            System.out.println("请求方法:"+soapAction);
            Object[] obj = client.invoke(soapAction, new Object[]{apiKey,soapXml});
            System.out.println("请求结果:");
            System.out.println(String.valueOf(obj[0]));
            return String.valueOf(obj[0]);
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println(e.getMessage());
        }
    return "";
    }
    
  


    /**
     *
     * @param type type 0 法人许可 1 自然人许可 2 法人处罚 3 自然人处罚
     * @param respList 返回值
     * @param xzxkList 许可集合
     * @param xzcfList 处罚集合
     * @param tableName 表名
     */
    @Transactional
     void saveSubmitLogs(int type, List<SubmitRespBean> respList, List<SubmitXzxkBean> xzxkList,
                                 List<SubmitXzcfBean> xzcfList ,String tableName) {
        // 保存上报记录信息及明细信息
        DateUtil dataUtil = DateUtil.getInstance();
        String batNo = "BN" + dataUtil.getCurrDate(DateUtil.YYYYMMDDHHMMSS);
        String subDate = dataUtil.getCurrDate(DateUtil.YYYY_MM_DD);
        SubmitLogsInfo logsInfo = new SubmitLogsInfo();

        int respSize = respList.size();
        SubmitLogsDetails detail = null;
        ArrayList<SubmitLogsDetails> detList = new ArrayList<SubmitLogsDetails>();
//原数据的recordIds 集合
        List<String> recordIds=new ArrayList<String>();
        if (type == 0||type==1) {// 行政许可
            recordIds = xzxkList.stream().map(SubmitXzxkBean -> SubmitXzxkBean.getId()).collect(Collectors.toList());
            for (int i = 0; i < respSize; i++) {
                SubmitRespBean reps = respList.get(i);
                if (reps != null && reps.getLine() != null) {
                    SubmitXzxkBean xk = xzxkList.get(Integer.valueOf(reps.getLine()));

                    detail = new SubmitLogsDetails();
                    detail.setBatNo(batNo);
                    detail.setSubCode(reps.getCode());
                    detail.setSubMsg(reps.getMsg());
                    detail.setRelId(xk.getId());
                    detail.setRelLb(xk.getLb());
                    detail.setXkXdrLb(xk.getXk_xdr_lb());
                    detail.setXkXdrMc(xk.getXk_xdr_mc());
                    detail.setXkLydwdm(xk.getXk_lydwdm());
                    if ("自然人".equals(xk.getXk_xdr_lb())) {
                        detail.setXkXdrDm(xk.getXk_xdr_zjhm());
                    } else {
                        detail.setXkXdrDm(xk.getXk_xdr_shxym());
                    }
                    detail.setSgsLx("行政许可");
                    detail.setLrrq(xk.getSjc());
                    detail.setRecStatus("1");
                    detList.add(detail);
                } else {
                    logsInfo.setRemarkInfo(reps.getCode() + ":" + reps.getMsg());
                }
            }
        } else {// 行政处罚
            recordIds = xzcfList.stream().map(SubmitXzcfBean -> SubmitXzcfBean.getId()).collect(Collectors.toList());
            for (int i = 0; i < respSize; i++) {
                SubmitRespBean reps = respList.get(i);
                if (reps != null && reps.getLine() != null) {
                    SubmitXzcfBean cf = xzcfList.get(Integer.valueOf(reps.getLine()));
                    detail = new SubmitLogsDetails();
                    detail.setSgsLx("行政处罚");
                    detail.setBatNo(batNo);
                    detail.setSubCode(reps.getCode());
                    detail.setSubMsg(reps.getMsg());
                    detail.setRelId(cf.getId());
                    detail.setRelLb(cf.getLb());
                    detail.setXkXdrLb(cf.getCf_xdr_lb());
                    detail.setXkXdrMc(cf.getCf_xdr_mc());
                    detail.setXkLydwdm(cf.getCf_sjlydm());
                    if ("自然人".equals(cf.getCf_xdr_lb())) {
                        detail.setXkXdrDm(cf.getCf_xdr_zjhm());
                    } else {
                        detail.setXkXdrDm(cf.getCf_xdr_shxym());
                    }
                    detail.setSgsLx("行政处罚");
                    detail.setLrrq(cf.getSjc());
                    detail.setRecStatus("1");
                    detList.add(detail);
                } else {
                    logsInfo.setRemarkInfo(reps.getCode() + ":" + reps.getMsg());
                }
            }
        }
        //
        ArrayList<SubmitRespBean> sucList = (ArrayList<SubmitRespBean>) respList.stream()
                .filter((SubmitRespBean resp) -> "00".equals(resp.getCode())).collect(Collectors.toList());

        upLoadService.updateXzStatusByRecordIds(tableName,recordIds);//需改原数据的状态
        int sucSize = sucList.size();// 成功条数

        logsInfo.setBatNo(batNo);
        logsInfo.setType(type);
        logsInfo.setSubDate(subDate);
        logsInfo.setSuccNum("" + sucSize);
        logsInfo.setFailNum("" + (respList.size() - sucSize));
        logsInfo.setRecStatus("1");
        upLoadService.saveSubmitLogsInfo(logsInfo);
        // 保存上报数据明细
        if (null == logsInfo.getRemarkInfo() || "".equals(logsInfo.getRemarkInfo())) {
            upLoadService.saveSubmitLogsDetails(detList);
        }
    }

    /**
     * 承诺书保存上传日志
     * @param type
     * @param respList
     * @param frPromiseList
     * @param zrrPromiseList
     * @param tableName 原表的表名
     */
    @Transactional
    void savePromiseSubmitLogs(int type, List<SubmitRespBean> respList, List<FrPromiseBookBean> frPromiseList,
                               List<ZrrPromiseBookBean> zrrPromiseList, String tableName) {
        // 保存上报记录信息及明细信息
        DateUtil dataUtil = DateUtil.getInstance();
        String batNo = "BN" + dataUtil.getCurrDate(DateUtil.YYYYMMDDHHMMSS);
        String subDate = dataUtil.getCurrDate(DateUtil.YYYY_MM_DD);
        SubmitLogsInfo logsInfo = new SubmitLogsInfo();

        int respSize = respList.size();
        SubmitPromiseLogsDetails detail = null;
        ArrayList<SubmitPromiseLogsDetails> detList = new ArrayList<SubmitPromiseLogsDetails>();
//原数据的recordIds 集合
        List<String> recordIds=new ArrayList<String>();
        if (type == 4) {// 法人信用承诺
            recordIds = frPromiseList.stream().map(FrPromiseBookBean -> FrPromiseBookBean.getId()).collect(Collectors.toList());
            for (int i = 0; i < respSize; i++) {
                SubmitRespBean reps = respList.get(i);
                if (reps != null && reps.getLine() != null) {
                    FrPromiseBookBean promise= frPromiseList.get(Integer.valueOf(reps.getLine()));

                    detail = new SubmitPromiseLogsDetails();
                    detail.setBatchNo(batNo);
                    detail.setResCode(reps.getCode());
                    detail.setResMsg(reps.getMsg());
                    detail.setRemark(promise.getMemo());
                    detail.setRecId(promise.getId());
                    detail.setType(promise.getXycn_type());
                    detail.setTyshxydm(promise.getCred_code());
                    detail.setZt_name(promise.getSubject_name());
                    detail.setZt_type("法人");
                    detail.setStatus("1");

                    detList.add(detail);
                } else {
                    logsInfo.setRemarkInfo(reps.getCode() + ":" + reps.getMsg());
                }
            }
        } else {// 自然人行政许可
            recordIds = zrrPromiseList.stream().map(ZrrPromiseBookBean -> ZrrPromiseBookBean.getId()).collect(Collectors.toList());
            for (int i = 0; i < respSize; i++) {
                SubmitRespBean reps = respList.get(i);
                if (reps != null && reps.getLine() != null) {
                    ZrrPromiseBookBean promise= zrrPromiseList.get(Integer.valueOf(reps.getLine()));

                    detail = new SubmitPromiseLogsDetails();
                    detail.setBatchNo(batNo);
                    detail.setResCode(reps.getCode());
                    detail.setResMsg(reps.getMsg());
                    detail.setRemark(promise.getMemo());
                    detail.setRecId(promise.getId());
                    detail.setType(promise.getXycn_type());
                    detail.setTyshxydm(promise.getPerson_cardno());
                    detail.setZt_name(promise.getPerson_name());
                    detail.setZt_type("自然人");
                    detail.setStatus("1");

                    detList.add(detail);
                } else {
                    logsInfo.setRemarkInfo(reps.getCode() + ":" + reps.getMsg());
                }
            }
        }
        //
        ArrayList<SubmitRespBean> sucList = (ArrayList<SubmitRespBean>) respList.stream()
                .filter((SubmitRespBean resp) -> "00".equals(resp.getCode())).collect(Collectors.toList());
            upLoadService.updateXzStatusByRecordIds(tableName,recordIds);//需改原数据的状态

        int sucSize = sucList.size();// 成功条数

        logsInfo.setBatNo(batNo);
        logsInfo.setSubDate(subDate);
        logsInfo.setSuccNum("" + sucSize);
        logsInfo.setFailNum("" + (respList.size() - sucSize));
        logsInfo.setRecStatus("1");
        upLoadService.savePromiseSubmitLogsInfo(logsInfo);
        // 保存上报数据明细
        if (null == logsInfo.getRemarkInfo() || "".equals(logsInfo.getRemarkInfo())) {
            upLoadService.saveSubmitPromiseLogsDetails(detList);
        }
    }
    
   
    @Transactional
    void saveLyjnSubmitLogs(int type, List<SubmitRespBean> respList, List<LYJNBean> List,
                               String tableName) {
        // 保存上报记录信息及明细信息
        DateUtil dataUtil = DateUtil.getInstance();
        String batNo = "BN" + dataUtil.getCurrDate(DateUtil.YYYYMMDDHHMMSS);
        String subDate = dataUtil.getCurrDate(DateUtil.YYYY_MM_DD);
        SubmitLogsInfo logsInfo = new SubmitLogsInfo();

        int respSize = respList.size();
        SubmitPromiseLogsDetails detail = null;
        ArrayList<SubmitPromiseLogsDetails> detList = new ArrayList<SubmitPromiseLogsDetails>();
//原数据的recordIds 集合
        List<String> recordIds=new ArrayList<String>();
    
            recordIds = List.stream().map(FrPromiseBookBean -> FrPromiseBookBean.getId()).collect(Collectors.toList());
            for (int i = 0; i < respSize; i++) {
                SubmitRespBean reps = respList.get(i);
                if (reps != null && reps.getLine() != null) {
                	LYJNBean promise= List.get(Integer.valueOf(reps.getLine()));

                    detail = new SubmitPromiseLogsDetails();
                    detail.setBatchNo(batNo);
                    detail.setResCode(reps.getCode());
                    detail.setResMsg(reps.getMsg());
                    detail.setRemark(promise.getBZ());
                    detail.setRecId(promise.getId());
                    detail.setType(promise.getWNRLB());
                    detail.setTyshxydm(promise.getWNRDM());
                    detail.setZt_name(promise.getWNRMC());
                  
                    detail.setStatus("1");

                    detList.add(detail);
                } else {
                    logsInfo.setRemarkInfo(reps.getCode() + ":" + reps.getMsg());
                }
            }
       
        //
        ArrayList<SubmitRespBean> sucList = (ArrayList<SubmitRespBean>) respList.stream()
                .filter((SubmitRespBean resp) -> "00".equals(resp.getCode())).collect(Collectors.toList());
            upLoadService.updateXzStatusByRecordIds(tableName,recordIds);//需改原数据的状态

        int sucSize = sucList.size();// 成功条数

        logsInfo.setBatNo(batNo);
        logsInfo.setSubDate(subDate);
        logsInfo.setSuccNum("" + sucSize);
        logsInfo.setFailNum("" + (respList.size() - sucSize));
        logsInfo.setRecStatus("1");
        upLoadService.savePromiseSubmitLogsInfo(logsInfo);
        // 保存上报数据明细
        if (null == logsInfo.getRemarkInfo() || "".equals(logsInfo.getRemarkInfo())) {
            upLoadService.saveSubmitPromiseLogsDetails(detList);
        }
    }
    public  String getImgStrBase64(String imagePath) {
        // 将图片文件转化为字节数组字符串，并对其进行Base64编码处理
        if(StringUtils.isNotBlank(imagePath)){
            InputStream in = null;
            byte[] data = null;
            // 读取图片字节数组
            try {
                in = new FileInputStream(imagePath);
                data = new byte[in.available()];
                in.read(data);
                in.close();
            } catch ( Exception e) {
                e.printStackTrace();
            }
            return Base64.encodeBase64String(data);
        }
        return "";

    }

    /**
     *
     * @param promiseList
     * @return
     */
    public List<FrPromiseBookBean> convert264(  List<FrPromiseBookBean> promiseList){
        for (FrPromiseBookBean promise:promiseList){
            promise.setPath_byte64(getImgStrBase64(promise.getPath_byte64()));
        }
        return promiseList;
    }
    /**
     *
     * @param promiseList
     * @return
     */
    public List<ZrrPromiseBookBean> convertZRR264(  List<ZrrPromiseBookBean> promiseList){
        for (ZrrPromiseBookBean promise:promiseList){
            promise.setPath_byte64(getImgStrBase64(promise.getPath_byte64()));
        }
        return promiseList;
    }

    public static void main(String[] args) throws Exception {
        Properties props = System.getProperties();
        props.setProperty("org.apache.cxf.stax.allowInsecureParser", "1");
        props.setProperty("UseSunHttpHandler", "true");
        props.setProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");;
        String nameSpace = "http://dal.rjcloud.dal";
        JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
        Client client = clientFactory.createClient("http://222.143.254.175:8080/xyd/ws/XyrDataInterfaceService?wsdl");
        String soapXml="<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
                "<ROWDATA>\n" +
                "    <ROW>\n" +
                "        <SUBJECT_NAME>登封市光大物业服务有限公司</SUBJECT_NAME>\n" +
                "        <CRED_CODE>91410185MA40LX7E83</CRED_CODE>\n" +
                "        <REG_CODE> </REG_CODE>\n" +
                "        <ORG_CODE> </ORG_CODE>\n" +
                "        <TAX_CODE> </TAX_CODE>\n" +
                "        <SYDW_CODE> </SYDW_CODE>\n" +
                "        <SHZZ_CODE> </SHZZ_CODE>\n" +
                "        <FR_NAME> </FR_NAME>\n" +
                "        <FR_CARDNO> </FR_CARDNO>\n" +
                "        <SOURCE_UNIT>郑州市信息中心</SOURCE_UNIT>\n" +
                "        <SOURCE_UNIT_CREDCODE>124101004160455794</SOURCE_UNIT_CREDCODE>\n" +
                "        <XYCN_CONTENT></XYCN_CONTENT>\n" +
                "        <XYCN_TYPE>主动公示型</XYCN_TYPE>\n" +
                "        <XYCN_DATE>2019-12-28</XYCN_DATE>\n" +
                "        <MEMO></MEMO>\n" +
                "        <FILE_NAME>登封市光大物业服务有限公司</FILE_NAME>\n" +
                "        <PATH_BYTE64>iVBORw0KGgoAAAANSUhEUgAAAkkAAAIACAYAAACW1/iQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAEXHSURBVHhe7d1NsyRXfedxvQuJB1tgE1hYBiPRksMGRUuWRAsa8yDJjJBpoRjTaMDhgblqhEF4LDDNgwETsLDnrr1wjO29t14QE/YLYDmzcrBg4YU3XniRUyezsioz62TmqapTVVl5P0TcoHVvVlZmnm+d8/3/zsmse+697/7Cj2uAAQxgAAPnyMA7f+3dxV//9f8q/uqv/rr42te+Xly//lTxq+/49fIn/Dv8LvwtbBO2nco53nrpM8UXvvCFpJ+w7VSO+5yP49OfvlW85zev9V7L8Lc/+INPt/5+zzmfsGPXqWMAAxjAQJCft/7SO4qPfvS54utf/5/F5eVl+RP+HX4X/jYlQcLs+TBLkiRpKhQMYAADs2Lg1TuvFRevfnlW50SsTiNWJEnnqCPBAAYwgAEMYCDCAEnywfDBwAAGMIABDGCAJJ0mrhOTuu4YwAAGMICB82NAkqR6UD1gAAMYwAAGMCBJOj+LVXloMwxgAAMYwMBpGJAkqR5UDxjAAAYwgAEMSJJOY6IqANcdAxjAAAYwcH4MSJJUD6oHDGAAAxjAAAYkSednsSoPbYYBDGAAAxg4DQOSJNWD6gEDGMAABjCAAUnSaUxUBeC6YwADGMAABs6PAUmS6kH1gAEMYAADGMCAJOn8LFbloc0wgAEMYAADp2FAkqR6UD1gAAMYwAAGMCBJOo2JqgBcdwxgAAMYwMD5MSBJUj2oHjCAAQxgAAMYkCSdn8WqPLQZBjCAAQxg4DQMSJJUD6oHDG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QnCW4S4r/7C1J4U3CmwUrC/GVH9cghQGdmE4MAxjIyUBKv2Mb41NwlVRBCn6TRZJSbMw247Gea+QaYQADGMAABqbDAElKmJME7HSA1RbaAgMYwAAGjsUASSJJSfOyxwLS++j8MIABDGBgKgyQJJJEkjCAAQxgAAMYiDBAknwwfDAwgAEMYAADGCBJIsypRJiOA4sYwAAGMDB1BiRJqgfVAwYwgAEMYAADEQb+PwGDeAgtbljvAAAAAElFTkSuQmCC</PATH_BYTE64>\n" +
                "        <ACCEPT_UNIT>郑州市信息中心</ACCEPT_UNIT>\n" +
                "        <ACCEPT_UNIT_CREDCODE>124101004160455794</ACCEPT_UNIT_CREDCODE>\n" +
                "        <IS_OPEN>1</IS_OPEN>\n" +
                "    </ROW>\n" +
                "</ROWDATA>";
        try {
            Object[] obj = client.invoke("setEnterprises", new Object[]{"7CF1549785FE3815B137E7F3DA9AB286",soapXml});
            System.out.println("请求结果:");
            System.out.println(String.valueOf(obj[0]));
        } catch (Exception e) {
            e.printStackTrace();
        }
//        Properties props = System.getProperties();
//        props.setProperty("org.apache.cxf.stax.allowInsecureParser", "1");
//        props.setProperty("UseSunHttpHandler", "true");
//        String nameSpace = "http://dal.rjcloud.dal";
//        JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
//        Client client = dcf.createClient("https://www.xyhn.gov.cn/creditdatas/ws/xzxkNewService?wsdl");
//        String respData = null;
//        QName name = new QName(nameSpace, "importPermissionXml");
//        String  soapXml="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" +
//        "<ROWDATA>\n" +
//        "    <ROW>\n" +
//        "        <XK_WSH>\n" +
//        "            京工商海处字〔2015〕第1149号\n" +
//        "        </XK_WSH>\n" +
//        "        <XK_XKWS>\n" +
//        "            颁发领队证\n" +
//        "        </XK_XKWS>\n" +
//        "        <XK_XKLB>\n" +
//        "            认可\n" +
//        "        </XK_XKLB>\n" +
//        "        <XK_NR>\n" +
//        "            领队证\n" +
//        "        </XK_NR>\n" +
//        "        <XK_XDR_MC>\n" +
//        "            王正\n" +
//        "        </XK_XDR_MC>\n" +
//        "<XK_XDR_LB>\n" +
//        "            自然人\n" +
//        "        </XK_XDR_LB>\n" +
//        "        <XK_XDR_SHXYM>\n" +
//        "        </XK_XDR_SHXYM>\n" +
//        "        <XK_XDR_ZZJG>\n" +
//        "        </XK_XDR_ZZJG>\n" +
//        "        <XK_XDR_GSZC>\n" +
//        "        </XK_XDR_GSZC>\n" +
//        "        <XK_XDR_SWDJ>\n" +
//        "        </XK_XDR_SWDJ>\n" +
//        "        <XK_XDR_SYDW>\n" +
//        "        </XK_XDR_SYDW>\n" +
//        "        <XK_XDR_SHZZ>\n" +
//        "        </XK_XDR_SHZZ>\n" +
//        "        <XK_FRDB>\n" +
//        "        </XK_FRDB>\n" +
//        "       <XK_FR_ZJLX>       \n" +
//        "      </XK_FR_ZJLX>\n" +
//        "        <XK_FR_ZJHM>\n" +
//        "        </XK_FR_ZJHM>\n" +
//        "        <XK_XDR_ZJLX>\n" +
//        "            身份证\n" +
//        "        </XK_XDR_ZJLX>\n" +
//        "        <XK_XDR_ZJHM>\n" +
//        "            451425198201123075\n" +
//        "        </XK_XDR_ZJHM>\n" +
//        "        <XK_XKZS>\n" +
//        "            煤矿生产许可证\n" +
//        "        </XK_XKZS>\n" +
//        "        <XK_XKBH>\n" +
//        "            食品经营许可证编号\n" +
//        "        </XK_XKBH>\n" +
//        "        <XK_JDRQ>\n" +
//        "            2015/07/01\n" +
//        "        </XK_JDRQ>\n" +
//        "        <XK_YXQZ>\n" +
//        "            2015/07/01\n" +
//        "        </XK_YXQZ>\n" +
//        "        <XK_YXQZI>\n" +
//        "            2016/07/01\n" +
//        "        </XK_YXQZI>\n" +
//        "        <XK_XKJG>\n" +
//        "            市旅游委\n" +
//        "        </XK_XKJG>\n" +
//        "        <XK_XKJGDM>\n" +
//        "            91410000586038718K\n" +
//        "        </XK_XKJGDM>\n" +
//        "        <XK_ZT>\n" +
//        "            1\n" +
//        "        </XK_ZT>\n" +
//        "        <XK_LYDW>\n" +
//        "            XX省XX市发展改革委\n" +
//        "        </XK_LYDW>\n" +
//        "        <XK_LYDWDM>\n" +
//        "            91410000586038718K\n" +
//        "        </XK_LYDWDM>\n" +
//        "\n" +
//        "        <SJC>\n" +
//        "            2015/07/28\n" +
//        "        </SJC>\n" +
//        "        <BZ>\n" +
//        "            无\n" +
//        "        </BZ>\n" +
//        "        <GKFW>\n" +
//        "            1\n" +
//        "        </GKFW>\n" +
//        "        </ROW>\n" +
//        "</ROWDATA>\n";
//        Object[] objects=client.invoke("importPenalyXml", new Object[]{"7CF1549785FE3815B137E7F3DA9AB286",soapXml});
//        if (objects!=null) {
//            respData= objects[0].toString();
//        }

    }
    HostnameVerifier hv = new HostnameVerifier() {
        public boolean verify(String urlHostName, SSLSession session) {
            System.out.println("Warning: URL Host: " + urlHostName + " vs. "
                               + session.getPeerHost());
            return true;
        }
    };

 	private static void trustAllHttpsCertificates() throws Exception {
 		javax.net.ssl.TrustManager[] trustAllCerts = new javax.net.ssl.TrustManager[1];
 		javax.net.ssl.TrustManager tm = new miTM();
 		trustAllCerts[0] = tm;
 		javax.net.ssl.SSLContext sc = javax.net.ssl.SSLContext
 				.getInstance("SSL");
 		sc.init(null, trustAllCerts, null);
 		javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory(sc
 				.getSocketFactory());
 	}

 	static class miTM implements javax.net.ssl.TrustManager,
 			javax.net.ssl.X509TrustManager {
 		public java.security.cert.X509Certificate[] getAcceptedIssuers() {
 			return null;
 		}

 		public boolean isServerTrusted(
 				java.security.cert.X509Certificate[] certs) {
 			return true;
 		}

 		public boolean isClientTrusted(
 				java.security.cert.X509Certificate[] certs) {
 			return true;
 		}

 		public void checkServerTrusted(
 				java.security.cert.X509Certificate[] certs, String authType)
 				throws java.security.cert.CertificateException {
 			return;
 		}

 		public void checkClientTrusted(
 				java.security.cert.X509Certificate[] certs, String authType)
 				throws java.security.cert.CertificateException {
 			return;
 		}
 	}
}
